Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Move jQuery and jQuery-ujs under /client and npm #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
dylangrafmyre merged 7 commits into master from move-jquery_ujs-under-npm
Sep 12, 2015

Conversation

@dylangrafmyre
Copy link
Contributor

@dylangrafmyre dylangrafmyre commented Sep 11, 2015

Comment out jquery-rails gem
Remove require for jQuery and jQuery-ujs from application.js
Change required order of application.js client-bundle and es5-shim
Add jquery-ujs to package.json and npm shrinkwrap
Remove comments about jQuery from webpack.common.config.js
Remove jQuery loader expose from webpack.rails.config.js
Comment out jQuery import or external jQuery since it is served from
/client.
Move jQuery and jQuery-ujs expose to via require to rails_only.jsx entry point.
Add info to README about using jQuery with Rails and Webpack
This fixes #51

Comment out jquery-rails gem
Remove require for jQuery and jQuery-ujs from application.js
Change required order of application.js client-bundle and es5-shim
Add jquery-ujs to package.json and npm shrinkwrap
Remove comments about jQuery from webpack.common.config.js
Remove jQuery loader expose from webpack.rails.config.js
Comment out jQuery import or external jQuery since it is served from
/client.
Move jQuery and jQuery-ujs expose to via require to rails_only.jsx entry point.
Gemfile Outdated
Copy link
Member

@justin808 justin808 Sep 11, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete, with some some comments as to why it's not there in the GemFile.

Copy link
Member

A few needed changes. Also, it's critical that you test this with rails s -e production so that you see if the CSRF stuff is working. The CSRF parts are not running during development, AFIK.

Copy link
Contributor Author

I was getting CSRF errors in development with jQuery being exposed in and not working from within webpack.rails_only.config.js.

I did asset:precompile for production and tested rails s -e production. There were no CSRF errors in production env.

On Sep 10, 2015, at 11:47 PM, Justin Gordon notifications@github.com wrote:

A few need changes. Also, it's critical that you test this with rails s -e production so that you see if the CSRF stuff is working. The CSRF parts are not running during development, AFIK.


Reply to this email directly or view it on GitHub.

Copy link
Contributor Author

@justin808 Final Review please after making changes from @alexfedoseev comments about where to expose and add entry for jQuery within webpack.common.config.js.

Thank you @alexfedoseev!!!

Test pass and no CSRF issues in dev or production.

Copy link
Member

Gemfile Outdated
Copy link
Member

@justin808 justin808 Sep 12, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# It is critical to not include any of the jquery gems when following this pattern or else you might have multiple jQuery versions.

Copy link
Member

Couple small suggests. Please let me know if we should push to heroku.

Copy link
Contributor Author

@justin808 you want to push the branch to Heroku to test first before the merge?

Copy link
Contributor Author

Branch is live on Heroku. Looks good to me.

Copy link
Member

Super. Let's merge and then push master.

dylangrafmyre added a commit that referenced this pull request Sep 12, 2015
Move jQuery and jQuery-ujs under /client and npm
@dylangrafmyre dylangrafmyre merged commit a8ca647 into master Sep 12, 2015
@dylangrafmyre dylangrafmyre deleted the move-jquery_ujs-under-npm branch September 12, 2015 01:30
Copy link
Member

@justin808 justin808 Sep 17, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dylangrafmyre We need to update this to ^1.1.1-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Break out jquery from jquery-ujs: How to use webpack complete managed javascript library

AltStyle によって変換されたページ (->オリジナル) /